package com.service.order.controller;


import com.service.order.Order;
import com.service.order.service.OrderService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RequestMapping("/api/order")
@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @Operation(summary = "创建订单",description = "创建订单方法")
    @GetMapping("/createOrder")
    public Order createOrder() {
        return orderService.createOrder();
    }


    @Operation(summary = "秒杀订单",description = "秒杀订单方法")
    @GetMapping("/seckill")
    public Order seckill() {
        return orderService.createOrder();
    }
}
